package com.hbfu.zggdwlzzsx.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hbfu.zggdwlzzsx.entity.Chapters;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ChapterMapper extends BaseMapper<Chapters> {

    @Select("select * from chapters where work_id = #{id}")
    List<Chapters> getChapteriesByWorkId(Integer id);

    @Select("select * from chapters where id = #{chapterid}")
    Chapters selectByChapterId(Integer chapterid);
}
